package com.byxy.dao.impl;

import org.springframework.stereotype.Repository;

import com.byxy.dao.UserDao;
import com.byxy.dao.core.impl.BaseDaoImpl;
import com.byxy.entity.User;

@Repository
public class UserDaoImpl extends BaseDaoImpl<User> implements UserDao {

	@Override
	public User getName(String login) {
		String hql = "from User where login =:login";
		User u = (User) sessionFactory.getCurrentSession().createQuery(hql).setParameter("login", login).uniqueResult();
		return u;
	}

}